.class public Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;


# instance fields
.field private a:Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;

.field private b:Lcom/waiqin365/lightapp/im/adapter/bd;

.field private c:Ljava/util/ArrayList;

.field private d:I


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    return-void
.end method

.method private a()V
    .locals 3

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "imPhotos"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->c:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "currentPage"

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->d:I

    return-void
.end method

.method private b()V
    .locals 2

    const v0, 0x7f0c0785

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->a:Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;

    new-instance v0, Lcom/waiqin365/lightapp/im/adapter/bd;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->c:Ljava/util/ArrayList;

    invoke-direct {v0, p0, v1}, Lcom/waiqin365/lightapp/im/adapter/bd;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->b:Lcom/waiqin365/lightapp/im/adapter/bd;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->a:Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->b:Lcom/waiqin365/lightapp/im/adapter/bd;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->a:Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;

    iget v1, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->d:I

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/view/photopreview/PhotoPreviewViewPager;->setCurrentItem(I)V

    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 5

    const/4 v4, 0x1

    invoke-super {p0, p1, p2, p3}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onActivityResult(IILandroid/content/Intent;)V

    const/4 v0, 0x3

    if-ne p1, v0, :cond_0

    packed-switch p2, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->b()Lcom/fiberhome/gaea/client/c/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/fiberhome/gaea/client/c/b;->f()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "imsavefile/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->b:Lcom/waiqin365/lightapp/im/adapter/bd;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/adapter/bd;->a()Luk/co/senab/photoview/PhotoView;

    move-result-object v1

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->mkdirs()Z

    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, ".jpg"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    if-eqz v1, :cond_2

    invoke-virtual {v1, v4}, Luk/co/senab/photoview/PhotoView;->setDrawingCacheEnabled(Z)V

    invoke-virtual {v1}, Luk/co/senab/photoview/PhotoView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    const/16 v3, 0x64

    invoke-static {v0, v3, v2}, Lcom/waiqin365/compons/camera/b/a;->a(Landroid/graphics/Bitmap;ILjava/lang/String;)Z

    const/4 v0, 0x0

    invoke-virtual {v1, v0}, Luk/co/senab/photoview/PhotoView;->setDrawingCacheEnabled(Z)V

    :cond_2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const v1, 0x7f0802a9

    invoke-virtual {p0, v1}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x5
        :pswitch_0
    .end packed-switch
.end method

.method public onBackPressed()V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->finish()V

    const/4 v0, 0x0

    const v1, 0x7f040028

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->overridePendingTransition(II)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f030146

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->setContentView(I)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->a()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/activity/ImPhotoListActivity;->b()V

    return-void
.end method
